package com.tjsinfo.tjsoa.bylaws.action;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.tjsinfo.tjsoa.bylaws.dao.IBylawsDao;
import com.tjsinfo.tjsoa.system.vo.User;
import com.tjsinfo.tjsoa.workplan.bo.IWorkPlanMainBo;

public class AuditPassListAction extends Action {
	
private IBylawsDao bylawsDao;
	
	public void setBylawsDao(IBylawsDao bylawsDao) {
		this.bylawsDao = bylawsDao;
	}
	private IWorkPlanMainBo workPlanMainBo;
	public IWorkPlanMainBo getWorkPlanMainBo() {
		return workPlanMainBo;
	}

	public void setWorkPlanMainBo(IWorkPlanMainBo workPlanMainBo) {
		this.workPlanMainBo = workPlanMainBo;
	}
	

	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		try{	

			HttpSession session=request.getSession();
			User user = (User)session.getAttribute("user");


			
		
		List result = null;
		String _articleCid=(String)request.getParameter("cid");
		// 查询已审核列表

		result=bylawsDao.findByThreeProperty("cid", _articleCid,"auditMan",String.valueOf(user.getUsername()),"auditing_sign","1");
		
		
	
		request.setAttribute("result", result);

		workPlanMainBo.selectMapWorkPlanMain(request);
		return mapping.findForward("success");
		
	}catch(Exception e){			
		e.printStackTrace();
		
		return mapping.findForward("failed");
	}
}
}